package com.example.demo.service;

import com.example.demo.dao.departmentMapper;
import com.example.demo.pojo.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DepartmentService {
    @Autowired
    departmentMapper departmentmapper;

    @Transactional(timeout = 10, readOnly = true, rollbackFor = Exception.class)
    public List<Department> countstaffnum(){
        return departmentmapper.countstaffnum();
    }
}
